home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
VISUALBA
/
ZIPINF.ZIP
/
SAMPLE.ZIP
/
ZSAMPLE.FRM
next >
Wrap
Text File
|
1993-12-20
|
7KB
|
249 lines
VERSION 2.00
Begin Form ZSample
BorderStyle = 3 'Fixed Double
Caption = "ZipInf Sample"
ClientHeight = 2685
ClientLeft = 1530
ClientTop = 2460
ClientWidth = 7215
Height = 3375
Left = 1470
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 2685
ScaleWidth = 7215
Top = 1830
Width = 7335
Begin ListBox List1
Height = 1980
Left = 240
Sorted = -1 'True
TabIndex = 0
Top = 480
Width = 2055
End
Begin MabryZipInfo ZipInfo1
DateFormat = ""
Left = 1920
Top = 0
End
Begin Label ItemMethod
Alignment = 1 'Right Justify
Height = 255
Left = 4560
TabIndex = 18
Top = 1680
Width = 2415
End
Begin Label Label12
Caption = "ItemMethod:"
Height = 255
Left = 2520
TabIndex = 17
Top = 1680
Width = 1935
End
Begin Label ItemTime
Alignment = 1 'Right Justify
Height = 255
Left = 4560
TabIndex = 16
Top = 1920
Width = 2415
End
Begin Label Label10
Caption = "ItemTime:"
Height = 255
Left = 2520
TabIndex = 15
Top = 1920
Width = 1935
End
Begin Label ItemUncompressed
Alignment = 1 'Right Justify
Height = 255
Left = 4560
TabIndex = 14
Top = 2160
Width = 2415
End
Begin Label Label8
Caption = "ItemUncompressed:"
Height = 255
Left = 2520
TabIndex = 13
Top = 2160
Width = 1935
End
Begin Label ItemDate
Alignment = 1 'Right Justify
Height = 255
Left = 4560
TabIndex = 12
Top = 960
Width = 2415
End
Begin Label Label7
Caption = "ItemDate:"
Height = 255
Left = 2520
TabIndex = 11
Top = 960
Width = 1935
End
Begin Label ItemFileComment
Alignment = 1 'Right Justify
Height = 255
Left = 4560
TabIndex = 10
Top = 1200
Width = 2415
End
Begin Label Label5
Caption = "ItemFileComment:"
Height = 255
Left = 2520
TabIndex = 9
Top = 1200
Width = 1935
End
Begin Label ItemCompressed
Alignment = 1 'Right Justify
Height = 255
Left = 4560
TabIndex = 8
Top = 480
Width = 2415
End
Begin Label Label3
Caption = "ItemCompressed:"
Height = 255
Left = 2520
TabIndex = 7
Top = 480
Width = 1935
End
Begin Label ItemCRC
Alignment = 1 'Right Justify
Height = 255
Left = 4560
TabIndex = 6
Top = 720
Width = 2415
End
Begin Label Label4
Caption = "ItemCRC:"
Height = 255
Left = 2520
TabIndex = 5
Top = 720
Width = 1935
End
Begin Label ItemFileName
Alignment = 1 'Right Justify
Height = 255
Left = 4560
TabIndex = 4
Top = 1440
Width = 2415
End
Begin Label Label2
Caption = "ItemFileName:"
Height = 255
Left = 2520
TabIndex = 3
Top = 1440
Width = 1935
End
Begin Label Label1
Caption = "Files in ZIP:"
Height = 255
Left = 240
TabIndex = 1
Top = 240
Width = 1215
End
Begin Menu MenuFile
Caption = "&File"
Begin Menu MenuFileOpen
Caption = "&Open"
Shortcut = ^O
End
Begin Menu MenuFileExit
Caption = "E&xit"
End
End
End
Option Explicit
Sub Form_Load ()
ZSample.Left = (Screen.Width - ZSample.Width) / 2
ZSample.Top = (Screen.Height - ZSample.Height) / 2
End Sub
Sub Form_Unload (Cancel As Integer)
End
End Sub
Sub List1_Click ()
Dim I As Integer
If List1.ListIndex < 0 Then
ItemCompressed = ""
ItemCRC = ""
ItemDate = ""
ItemFileComment = ""
ItemFileName = ""
ItemMethod = ""
ItemTime = ""
ItemUncompressed = ""
Else
I = List1.ItemData(List1.ListIndex)
ItemCompressed = Format$(ZipInfo1.ItemCompressed(I)) + " bytes"
ItemCRC = Hex$(ZipInfo1.ItemCRC(I))
ItemDate = ZipInfo1.ItemDate(I)
ItemFileComment = ZipInfo1.ItemFileComment(I)
ItemFileName = ZipInfo1.ItemFileName(I)
Select Case ZipInfo1.ItemMethod(I)
Case 0
ItemMethod = "None"
Case 1
ItemMethod = "Shrunk"
Case 2 - 5
ItemMethod = "Reduced"
Case 6
ItemMethod = "Imploded"
Case 7
ItemMethod = "Tokenized"
Case 8
ItemMethod = "Deflated"
Case Else
ItemMethod = "Unknown"
End Select
ItemTime = ZipInfo1.ItemTime(I)
ItemUncompressed = Format$(ZipInfo1.ItemUncompressed(I)) + " bytes"
End If
End Sub
Sub MenuFileExit_Click ()
End
End Sub
Sub MenuFileOpen_Click ()
Dim I As Integer
ZSample2.Show 1
List1.Clear
For I = 0 To ZipInfo1.ListCount - 1
List1.AddItem ZipInfo1.ItemFileName(I)
List1.ItemData(List1.NewIndex) = I
Next I
End Sub